﻿<%%@ 
Control Language="C#" 
AutoEventWireup="true" 
CodeBehind="ucList_<%= @table.TableName %>.ascx.cs" 
Inherits="<%=@ui_namespace%>.ucList_<%= @table.TableName %>" 
%%>
<div id="divToolbar">
<asp:Button runat="server" ID="btnNew" OnClick="handleNewRecord"  Text="New record"/>
</div>
<asp:GridView ID="gvList" runat="server" CellPadding="4" 
    ForeColor="Black" GridLines="Vertical" onrowcommand="handleRowSelect" 
    EnableSortingAndPagingCallbacks="False" AllowSorting="True" 
    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
    DataSourceID="SqlDataSource1" AutoGenerateColumns="False" 
    DataKeyNames="ID" AllowPaging="True"  >
    <AlternatingRowStyle BackColor="White" />
    <EmptyDataTemplate>
    No records found.
    </EmptyDataTemplate>
    <Columns>
        <asp:CommandField ShowSelectButton="True" />
        <% for col in @table.Columns %>
		<asp:BoundField 
			DataField="<%= col.ColumnName %>" 
			HeaderText="<%= get_human_db_ref(col.ColumnName) %>" 
			ReadOnly="True" 
			SortExpression="<%= col.ColumnName %>" />
		<% end %>
    </Columns>
    <FooterStyle BackColor="#CCCC99" />
    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
    <RowStyle BackColor="#F7F7DE" />
    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"   DataSourceMode="DataSet" ProviderName="System.Data.OracleClient">
</asp:SqlDataSource>



